Chroma keying typically involves the removal of a color or colors from a digital image (which for brevity will simply be referred to as an image) so that the areas of removed color can be replaced with another image. Chroma keying is commonly used in television broadcasts; for example, weather reporters often stand in front of a blue or green screen, and chroma keying is used to replace the screen with a weather map. Chroma keying is also referred to as “color keying” or “color-separation overlay” (CSO). Chroma keying typically involves photographing or filming foreground objects (e.g., a person) in front of a backdrop having a single color or, if the lighting is uneven or the backdrop is a poor quality backdrop, a relatively narrow range of colors. The backdrop is commonly blue or green because those colors tend not to be found in skin tones.
A clean reference image (or reference frame or key) that depicts the background of an image (usually a blue or green screen used during filming) is important to chroma keying. During background replacement, different chroma keying techniques compare an image with a reference image to distinguish foreground areas from background areas. If the reference image does not accurately depict the background, chroma keying can incorrectly replace areas of the image that are not background or fail to replace areas of the image that are background.
This problem has typically been solved by capturing one image of a scene with all of the foreground objects removed. That image serves as a clean reference frame, and includes subtle details of the background that result from uneven lighting or defects in the material of the background. However, sometimes capturing such an image may not be practical—for example, if the scene includes heavy foreground objects such as furniture that are difficult to remove. Sometimes, filming may be completed and it is no longer possible to capture an image of the background.